
#include<vector>
#include <complex>
#include <iostream>
using namespace std;

//int main() {
//    int n = 0;
//    cin >> n;
//    int a = 0, b = 1, sum = 0;;
//    for (int i = 2; sum < n; i++)
//    {
//        sum = a + b;
//        a = b;
//        b = sum;
//    }
//    int c = abs(a - n);
//    int d = abs(b - n);
//    cout << (c < c ? c : d);
//    return 0;
//}

int main() {
    int n = 0;
    cin >> n;
    vector<vector<int>> vv;
    for (int i = 0; i < n; i++)
    {
        vector<int> v;
        for (int j = 0; j < i + 1; j++)
        {

            if (j == 0 || j == i) v.push_back(1);
            else v.push_back((vv[i - 1][j] + vv[i - 1][j - 1]));
        }
        vv.push_back(v);
        v.clear();
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < i + 1; j++)
        {
            cout << vv[i][j] << "     ";
        }
        cout << endl;
    }
    return 0;
}